<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
//    return  phpinfo();


    return 'this is sign weixin mini web';

});



Route::get('filter','HomeController@filter');//App\Models\User词过滤测试

Route::get('wxPayClient','HomeController@getWxPay');

Route::group([
    'prefix' => 'admin',
    'namespace' => 'Home',
],function (){



    Route::get('/','IndexController@index')->name('admin.index');//默认页,index
    Route::get('index','IndexController@index')->name('admin.index');
    Route::get('welcome','IndexController@welcome')->name('admin.welcome');//welcome页

    Route::prefix('login')->group(function (){
        Route::get('show', 'LoginController@show')->name('admin.login.show');//登录页
        Route::post('sign','LoginController@sign')->name('admin.login.sign');//登录

        Route::get('logout','LoginController@logout')->name('admin.login.logout');//退出
    });


    //梦想学院：功能模块（注册.登录...等）
    Route::namespace('Sign')->group(function (){
        //报考专业
        Route::resource('projects', 'ProjectController');//restful 资源类型
        Route::get('project/createSon/{id}','ProjectController@createSonProject')->name('create.son.project');//创建子栏目
        Route::post('project/addSon','ProjectController@addSonProject')->name('add.son.project');//添加子栏目
        Route::post('project/delete','ProjectController@deleteProject')->name('delete.project');//删除
        Route::get('project/switch','ProjectController@switchProject')->name('switch.project');

        //编辑器测试
        Route::get('UEditor','ProjectController@ueditor')->name('baidu.editor');
        Route::post('addEditor','ProjectController@addEditor')->name('addEditor');

    });

    //梦想学院：业务模块
    Route::namespace('Dream')->group(function (){
        //视频板块
        Route::resource('videos','VideoController');

        //活动版块
        Route::namespace('Activity')->prefix('activity')->group(function (){
            //双色球
            Route::prefix('sphere')->group(function(){

                Route::get('index','SphereController@index')->name('activity.sphere.index');//活动展示
                Route::get('create','SphereController@create')->name('activity.sphere.create');//创建
                Route::post('store','SphereController@store')->name('activity.sphere.store');//添加
                Route::get('edit/{id}','SphereController@edit')->name('activity.sphere.edit');//修改
                Route::post('update','SphereController@update')->name('activity.sphere.update');//更新

                Route::get('pushMsg','SphereController@pushMsg')->name('activity.sphere.pushMsg');//消息推送（消息订阅）

            });
        });
    });






});

